package com.ctg.itrdc.imageconsole.data.dao.impl;

import java.util.List;

import org.springframework.stereotype.Component;

import com.ctg.itrdc.imageconsole.data.dao.IDockerMicroAppDao;
import com.ctg.itrdc.imageconsole.data.entity.DockerMicroApp;
import com.ctg.itrdc.paspsdk.data.dao.impl.BaseDaoImpl;

@Component("dockerMicroAppDao")
public class DockerMicroAppDaoImpl extends BaseDaoImpl implements IDockerMicroAppDao{

	@Override
	public List<DockerMicroApp> selectByCreateUserIdAndAppCode(Long createUserId, String appCode) {
		DockerMicroApp app = new DockerMicroApp();
		app.setCreateUserId(createUserId);
		app.setCode(appCode);
		return this.selectByExample(app);
	}

	@Override
	public DockerMicroApp selectById(Long id) {
		DockerMicroApp app = new DockerMicroApp();
		app.setId(id);
		return this.selectByPrimaryKey(app);
	}

	@Override
	public void updateDescription(Long id, String description) {
		DockerMicroApp app = new DockerMicroApp();
		app.setId(id);
		app.setDescription(description);
		this.updateSelectiveByPrimaryKey(app);
		
	}

	
	
	
}
